package com.lyd.management.pojo;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

import java.time.LocalDateTime;
import java.util.Objects;

public class Book {
    @TableId(type= IdType.ASSIGN_UUID)
    private String bookId;
    private  String userId;
    private String roomId;
    private LocalDateTime bookStarttime;
    private LocalDateTime bookEndtime;

    @Override
    public String toString() {
        return "Book{" +
                "bookId='" + bookId + '\'' +
                ", userId='" + userId + '\'' +
                ", roomId='" + roomId + '\'' +
                ", bookStarttime=" + bookStarttime +
                ", bookEndtime=" + bookEndtime +
                '}';
    }

    public LocalDateTime getBookStarttime() {
        return bookStarttime;
    }

    public void setBookStarttime(LocalDateTime bookStarttime) {
        this.bookStarttime = bookStarttime;
    }

    public LocalDateTime getBookEndtime() {
        return bookEndtime;
    }

    public void setBookEndtime(LocalDateTime bookEndtime) {
        this.bookEndtime = bookEndtime;
    }

    public String getBookId() {
        return bookId;
    }

    public void setBookId(String bookId) {
        this.bookId = bookId;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getRoomId() {
        return roomId;
    }

    public void setRoomId(String roomId) {
        this.roomId = roomId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Book book = (Book) o;
        return Objects.equals(bookId, book.bookId) && Objects.equals(userId, book.userId) && Objects.equals(roomId, book.roomId) && Objects.equals(bookStarttime, book.bookStarttime) && Objects.equals(bookEndtime, book.bookEndtime);
    }

    @Override
    public int hashCode() {
        return Objects.hash(bookId, userId, roomId, bookStarttime, bookEndtime);
    }
}
